package com.android.SchoolManagerSystem.data;

import java.util.ArrayList;
import java.util.List;


/**
 * the class is mainly for save user info in a process
 * do init it while user login 
 * @author oracle
 * @date 2011-7
 */
public class Userinfo {
	public String strusername = "";
	public String struserid = "";
	public String strClass = "";
	
	public String strSex = "";
	public String strBirthday = "";
	public String strNation = "";
	public String strBirthPlace = "";
	public String strMobileNo = "";
	public String strBedroom = "";
	public String strHomeTown = "";
	public String strpolitics = "";

	public List<Curricula> MyCurricula = null;
	public List<Transcript> MyScore = null;
	public List<InternShip> MyIntership = null;

	public String struserpsw = "";
	public String usertype = "1";

	public String getuserpsw() {
		return struserpsw;
	}

	/**
	 * init user info by get username & password
	 * 
	 * @author oracle
	 * @date 2011-7
	 */
	public Userinfo(String inputusername, String inputpassword) {
		strusername = null;
		struserpsw = inputpassword;
		strClass = null;
		struserid = inputusername;
		MyScore = new ArrayList<Transcript>();
		MyCurricula = new ArrayList<Curricula>();
		MyIntership = new ArrayList<InternShip>();
	}

	/**
	 * clear a user info while it logout
	 * 
	 * @author oracle
	 * @date 2011-7
	 */
	public void clear() {
		strusername = null;
		struserid = null;
		strClass = null;
		struserpsw = null;

		MyCurricula.clear();
		MyScore.clear();
	}

}
